<?php 
$v=mt_rand(1, 9);
$x=mt_rand(1, 9); 
$y=mt_rand(1, 9);
$z=mt_rand(1, 9);
$q=mt_rand(1, 20);
$input = array("+", "-","+", "-");
$rand_keys = array_rand($input, 2);
$a = $input[$rand_keys[0]] . "\n";
$b= $input[$rand_keys[1]] . "\n";

echo $a;
$d= $x + $y. $b. $z;

echo ($d).'<br> <br>';

echo $x.$a.$y.$b.$z.$a.$v.'<br>' ;
echo '<=>'.$q.'? <br>';
$tanggal = date("Y-m-d").'<br>';
$jam = date("H:i:s");
echo $tanggal.$jam;
?>


 <form id="form1" name="form1" method="post" action="simpan_jawaban.php">
 <table width="100%" border="0">
      <tr>
        <td>Soal</td>
        
        <td>
        <input name="soal" type="text" id="soal" size="25" value="<?php   echo $x.$a.$y.$b.$z.$a.$v	; ?>" readonly/></td>
      </tr>
      <tr>
        <td>Jawaban    <=>?</td>
        
        <td>
          <input name="jawaban" type="text" id="jawaban" size="25" value="<?php   echo $q;	; ?>" readonly/></td><br>
      </tr></tr>
	  <tr><tr> 
	  <td><input type="radio" name="jawab" value="lebih kecil">lebih kecil <br>
<input type="radio" name="jawab" value="sama dengan">sama dengan<br>
<input type="radio" name="jawab" value="lebih besar">lebih besar</td>
</tr></tr>

<tr> <td><input type="submit"></td> </tr>

	  
	  
	  
	  
	  